Skip to content

Rollup of 8 pull requests - #158661

Closed
JonathanBrouwer wants to merge 25 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-CFmBWMa
Closed

Rollup of 8 pull requests#158661
JonathanBrouwer wants to merge 25 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-CFmBWMa

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Kyuuhachi and others added 25 commits June 26, 2026 19:07
Remove trivial bounds

Panic on NaN

Make assert messages consistent with field names

Add clamp_to coretests

Update to fmt style
in `tests/ui/consts/const-eval/raw-bytes.rs` as we now handle this in
our modified regex in `runtest`
Specifically, all `//@ ignore-parallel-frontend different alloc ids`
across other tests because they fail with our
normalization strategy: `ALLOC0` -> `ALLOC$ID`
Fixes test failures on {aarch64*-none, armv7r-eabihf, thumbv7em-eabi*} targets which
have panic=abort by default
…nstantiate_identity().skip_norm_wip().def_id
The starting point of this commit is that `ModuleData`, `ImportData`,
and `DeclData` are all interned, and don't need to be `Clone`.

Then there are various types nestled within these types that also don't
need to be `Clone`.
Three of the four public allocation functions in `DroplessArena` check
that the allocated type doesn't implement `Drop`: `alloc`,
`alloc_slice`, `alloc_from_iter`. This commit adds the missing check to
`try_alloc_from_iter`.

It also moves and reorders some lines in `alloc_from_iter` for
consistency with the other methods.
…,ChrisDenton

Implement clamp_to

Implements the revised version of rust-lang#147781. Supersedes rust-lang#147786.

Currently I restrict the ClampBounds trait using a second, perma-unstable feature. I don't know if that's the usual way to deal with this kind of traits, I'd be happy to change it if not.

~~I currently define NaN as equal to no bound. This is consistent with `max` and `min`, but is inconsistent with `clamp`, which panics.~~

Changed so that the float versions panic if any bound is NaN, just like `clamp` does.
…llel-frontend, r=petrochenkov

tests: fix: parallel frontend test failures: different alloc ids

Removed the `//@ ignore-parallel-frontend different alloc ids` directive from all the ui tests applicable and replaced it with `//@ normalize-stderr` so that all alloc ids mentions are converted into a single placeholder. Thus the tests are passed

Part of [rust-lang#154314](rust-lang#154314)

r? @petrochenkov
…ping, r=petrochenkov

delegation: support simplest output `Self` mapping

This PR supports simplest output `Self` mapping for callee path if the following conditions are met (see `should_wrap_return_value`).

Example:
```rust
trait Trait {
    fn method(&self) -> Self;
    fn r#static() -> Self;
    fn raw_S(&self) -> S { S }
}

struct S;
impl Trait for S {
    fn method(&self) -> S { S }
    fn r#static() -> S { S }
}

struct W(S);
impl Trait for W {
    #[attr = Inline(Hint)]
    fn method(self: _) -> _ { Self { 0: Trait::method(self.0) } }
    #[attr = Inline(Hint)]
    fn r#static() -> _ { Trait::r#static() }
    //~^ WARN: function cannot return without recursing [unconditional_recursion]
    #[attr = Inline(Hint)]
    fn raw_S(self: _) -> _ { Trait::raw_S(self.0) }
}

impl W {
    #[attr = Inline(Hint)]
    fn method(self: _) -> _ { Self { 0: Trait::method(self.0) } }
    #[attr = Inline(Hint)]
    fn r#static() -> _ { Trait::r#static() }
    #[attr = Inline(Hint)]
    fn raw_S(self: _) -> _ { Trait::raw_S(self.0) }
}

```

~If the above conditions are met, there is no need to propagate generics of a newtype, as unused generics is an error, thus they should be used in a single field and it can be inferred from the return type of callee path.~

~Accessing signatures through queries produced query cycles in one test, so `with_no_trimmed_paths` was used to prevent it, though it can cause other cycles in other situations maybe.~

Part of rust-lang#118212.
r? @petrochenkov
…est, r=joboet

Fix getrandom fallback test on platforms with `panic=abort`

The recently-added linux-getrandom-fallback test fails on targets matching {aarch64*-none, armv7r-eabihf, thumbv7em-eabi*}. This is because those platforms set `panic=abort` by default, and the test relies on being able to catch a panic.

Mark the test as `needs-unwind` so that it won't be run in `panic=abort` configurations.

Also add extra debug information to the panic when getrandom() fails with an unexpected error code on Linux
…nder-def-id, r=lcnr

Remove skip_norm_w/i/p().def_id with a helper

part of rust-lang#155345

r? @lcnr
…rochenkov

Remove unnecessary `Clone` derives on resolver types

The starting point of this commit is that `ModuleData`, `ImportData`, and `DeclData` are all interned, and don't need to be `Clone`.

Then there are various types nestled within these types that also don't need to be `Clone`.

r? @petrochenkov
…, r=Nadrieril

Add missing `needs_drop` check to `DroplessArena`.

Three of the four public allocation functions in `DroplessArena` check that the allocated type doesn't implement `Drop`: `alloc`, `alloc_slice`, `alloc_from_iter`. This commit adds the missing check to `try_alloc_from_iter`.

It also moves and reorders some lines in `alloc_from_iter` for consistency with the other methods.

r? @Nadrieril
…arfonthey

Document `strip_circumfix` behavior on overlapping prefix and suffix.

Fixes rust-lang#158388, as per T-libs-api decision there.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 1, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 1, 2026
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 1, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ecc3edf has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2026
@rust-bors rust-bors Bot mentioned this pull request Jul 1, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #150075 (Implement clamp_to)
 - #156716 (tests: fix: parallel frontend test failures: different alloc ids)
 - #158397 (delegation: support simplest output `Self` mapping)
 - #158613 (Fix getrandom fallback test on platforms with `panic=abort`)
 - #158620 (Remove skip_norm_w/i/p().def_id with a helper)
 - #158633 (Remove unnecessary `Clone` derives on resolver types)
 - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
 - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 1, 2026
@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0b9b298 failed: CI. Failed job:

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 1, 2026
@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

PR #150075, which is a member of this rollup, was unapproved.

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 1, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 1, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@JonathanBrouwer
JonathanBrouwer deleted the rollup-CFmBWMa branch August 21, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.